1. Field of the Invention
The present invention relates to a printing apparatus for printing an image on a sheet while checking the presence or absence of the sheet.
2. Description of the Related Art
In many printing apparatuses, a paper end sensor (PE sensor) is provided in a sheet conveying path, and passage of a front end and a rear end of a sheet is detected to manage a printing start position and a printing end position of the printing medium.
Further, Japanese Patent Laid-open No. 2005-74807 discloses a serial inkjet printing apparatus wherein an optical sensor is provided to a side portion of a carriage which moves in a state in which a print head is mounted in the carriage to detect the width of a sheet and a test pattern printed by the print head. More specifically, firstly, a pattern for confirming the width of a printing medium is printed and after it is confirmed that this pattern can be normally detected by the optical sensor, a pattern for adjusting the printing position of the print head is printed and read.
In this manner, various sensors are used to detect the width and length of a sheet, whereby a desired image can be stably output without printing on an area outside the conveyed sheet.
Incidentally, as the above-described PE sensor, a sensor for detecting a front end of a sheet based on rotation of a lever which contacts the sheet and rotates during conveyance of the sheet is widely used because this sensor includes a small number of components and is low in cost.
However, in the PE sensor having the above configuration, in a case where a sheet is back-fed halfway, the lever as well is sometimes returned to an original position, that is, a position where it is determined that a sheet does not exist. In this case, the position of the lever is not changed even by forward-feeding the sheet again thereafter, and the PE sensor cannot accurately detect a rear end of the sheet at the time of passage of the rear end of the sheet. As a result, in a case where a sheet whose length is smaller than the length of an image to be printed is erroneously fed, a print head may print on an area outside the rear end of the sheet to contaminate the inside of the apparatus.
In particular, in a configuration in which the optical sensor is provided upstream of the print head in a conveying direction as disclosed in Japanese Patent Laid-open No. 2005-74807, back-feeding of a sheet is necessary for the optical sensor to detect the test pattern printed by the print head. More specifically, in the configuration disclosed in Japanese Patent Laid-open No. 2005-74807, use of the above-described PE sensor which normally functions only in a forward-feeding state leads to false detection by the PE sensor itself and printing on an area outside a sheet, and it is impossible to perform control properly.